﻿<Window x:Class="Wen.UI.NavigationWindow" x:Name="NavigatorWindow"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Converters="clr-namespace:Wen.Core.Converters;assembly=Wen.Core"
        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" WindowState="{Binding WindowState}"
        xmlns:Behaviors="clr-namespace:Wen.Core.Behaviors;assembly=Wen.Core" Icon="Resources/Images/wen.ico" Closing="NavigatorWindowClosing"
        Background="Transparent">
	<Window.Style>
		<Style TargetType="Window">
			<Setter Property="Background" Value="Transparent" />
			<Setter Property="WindowStyle" Value="None" />
			<Setter Property="AllowsTransparency" Value="True" />
			<Setter Property="Topmost" Value="True" />
			<Setter Property="Width" Value="200" />
			<Setter Property="Height" Value="400" />
			<Setter Property="ResizeMode" Value="NoResize" />
			<Setter Property="Opacity" Value="0.3" />
			<Setter Property="Title" Value="Wen" />
			<Setter Property="FontFamily" Value="Segoe UI" />
			<Style.Triggers>
				<Trigger Property="IsMouseOver" Value="True">
					<Setter Property="Opacity" Value="1" />
				</Trigger>
			</Style.Triggers>
		</Style>
	</Window.Style>
	<i:Interaction.Behaviors>
		<Behaviors:CommandOnClosingBehavior Command="{Binding CleanUpCommand}" />
		<Behaviors:DragMoveBehavior />
	</i:Interaction.Behaviors>
	<Grid>
		<Border VerticalAlignment="Top" Height="18" Margin="3,3,0,0" CornerRadius="0 3 0 0">
			<Border.Background>
				<LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
					<GradientStop Color="#3FFFFFFF" Offset="1"/>
					<GradientStop Color="#34FFFFFF"/>
					<GradientStop Color="#4DFFFFFF" Offset="0.702"/>
				</LinearGradientBrush>
			</Border.Background>
			<DockPanel>
				<Button Command="{Binding CloseCommand}" Style="{StaticResource ExitButtonStyle}" DockPanel.Dock="Right" />
				<Button Command="{Binding MinimizeCommand}" Style="{StaticResource MinimizeButtonStyle}" DockPanel.Dock="Right" />
				<ToggleButton IsChecked="{Binding IsShowingAbout, Mode=TwoWay}" Style="{StaticResource AboutButtonStyle}" DockPanel.Dock="Right">
					<ToggleButton.IsEnabled>
						<MultiBinding Converter="{x:Static Converters:OrConverter.Instance}">
							<Binding Path="IsTrackingProcess" />
							<Binding Path="IsShowingAbout" Converter="{x:Static Converters:NotConverter.Instance}" />
						</MultiBinding>
					</ToggleButton.IsEnabled>
				</ToggleButton>
				<ToggleButton IsChecked="{Binding IsShowingProcessList, Mode=TwoWay}" Style="{StaticResource SelectProcessButtonStyle}" DockPanel.Dock="Right">
					<ToggleButton.IsEnabled>
						<MultiBinding Converter="{x:Static Converters:OrConverter.Instance}">
							<Binding Path="IsTrackingProcess" />
							<Binding Path="IsShowingProcessList" Converter="{x:Static Converters:NotConverter.Instance}" />
						</MultiBinding>
					</ToggleButton.IsEnabled>
				</ToggleButton>
				<TextBlock Text="WEN" Foreground="#DD222222" HorizontalAlignment="Left" Margin="100 0 0 0" VerticalAlignment="Center" FontSize="14.667" FontWeight="Bold" />
			</DockPanel>
		</Border>
		<TabControl Visibility="{Binding IsShowingNavigator, Converter={x:Static Converters:BooleanToVisibilityConverter.Instance}}">
			<TabItem Header="Camera">
				<ContentControl Content="{Binding CameraViewModel}" />
			</TabItem>
			<TabItem Header="Lights">
				<ItemsControl ItemsSource="{Binding LightViewModels}" />
			</TabItem>
		</TabControl>
		<TabControl Visibility="{Binding IsShowingProcessList, Converter={x:Static Converters:BooleanToVisibilityConverter.Instance}}">
			<TabItem Header="Select a process">
				<ContentControl Content="{Binding SelectProcessListViewModel}" />
			</TabItem>
		</TabControl>
		<TabControl Visibility="{Binding IsShowingAbout, Converter={x:Static Converters:BooleanToVisibilityConverter.Instance}}">
			<TabItem Header="About Wen">
				<ContentControl Content="{Binding AboutViewModel}" />
			</TabItem>
		</TabControl>
	</Grid>
</Window>